package pl.edu.pw.polygen.modeler.client.toolbox.command;

import pl.edu.pw.polygen.modeler.client.workspace.IWorkspace;
import pl.edu.pw.polygen.modeler.client.workspace.listener.HoleListener;
import pl.edu.pw.polygen.modeler.client.workspace.listener.IWorkspaceListener;
import pl.edu.pw.polygen.modeler.client.workspace.listener.SelectListener;
import pl.edu.pw.polygen.modeler.client.workspace.listener.VertexListener;

public class HoleCommand implements ICommand {

	private IWorkspace workspace;
	private IWorkspaceListener workspaceListener;

	public HoleCommand(IWorkspace workspace) {
		this.workspace = workspace;
		this.workspaceListener = new HoleListener(workspace);
	}

	@Override
	public void execute() {
		workspace.dropAll();
		workspace.unselectAll();
		workspace.setLocked();
		workspace.setWorkspaceListener(workspaceListener);
	}

}
